package com.java.member.api;

import com.java.common.vo.R;
import com.java.member.entity.MyUser;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

import javax.validation.Valid;

/**
 * @author jiangli
 * @since 2019/12/9 19:31
 */
public interface MemberApi {

	@PostMapping("/member/registry")
	R registry(@RequestBody @Valid MyUser myUser);

	@PostMapping("/member/login")
	R login(@RequestBody MyUser myUser);

	@GetMapping("/member/getUserByOpenid")
	R loginByOpenid(@RequestParam("openid") String openid,@RequestParam("nickname")String nickname);

	@GetMapping("/member")
	R getUserInfoByToken(@RequestParam("token") String token);

}
